import service from '@/utils/request'

// @Tags TReferral
// @Summary 创建tReferral表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.TReferral true "创建tReferral表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /tReferral/createTReferral [post]
export const createTReferral = (data) => {
  return service({
    url: '/tReferral/createTReferral',
    method: 'post',
    data
  })
}

// @Tags TReferral
// @Summary 删除tReferral表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.TReferral true "删除tReferral表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /tReferral/deleteTReferral [delete]
export const deleteTReferral = (data) => {
  return service({
    url: '/tReferral/deleteTReferral',
    method: 'delete',
    data
  })
}

// @Tags TReferral
// @Summary 批量删除tReferral表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除tReferral表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /tReferral/deleteTReferral [delete]
export const deleteTReferralByIds = (data) => {
  return service({
    url: '/tReferral/deleteTReferralByIds',
    method: 'delete',
    data
  })
}

// @Tags TReferral
// @Summary 更新tReferral表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.TReferral true "更新tReferral表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /tReferral/updateTReferral [put]
export const updateTReferral = (data) => {
  return service({
    url: '/tReferral/updateTReferral',
    method: 'put',
    data
  })
}

// @Tags TReferral
// @Summary 用id查询tReferral表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.TReferral true "用id查询tReferral表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /tReferral/findTReferral [get]
export const findTReferral = (params) => {
  return service({
    url: '/tReferral/findTReferral',
    method: 'get',
    params
  })
}

// @Tags TReferral
// @Summary 分页获取tReferral表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取tReferral表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /tReferral/getTReferralList [get]
export const getTReferralList = (params) => {
  return service({
    url: '/tReferral/getTReferralList',
    method: 'get',
    params
  })
}

export const getMovieApi = () => {
  return service({
    url: '/movie/getMovieAutoList',
    method: 'get'
  })
}

export const getConvRulesApi = () => {
  return service({
    url: '/tConversionRulesZ/getTConversionRulesZList',
    method: 'get'
  })
}

export const refreshTReferralByIds = (data) => {
  return service({
    url: '/tReferral/refreshTReferralByIds',
    method: 'post',
    data
  })
}


